package com.tsing.cli.common.exception;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 返回结果状态码枚举类
 *
 * @author TheTsing
 */
@Getter
@AllArgsConstructor
public enum ResponseCode {

    SUCCESS(0, "success"),

    SERVER_ERROR(600, "系统错误"),

    METHOD_ARGUMENT_NOT_VALID_EXCEPTION(601, "参数校验错误"),

    BIND_EXCEPTION(602, "参数绑定错误"),

    HTTP_REQUEST_METHOD_NOT_SUPPORTED_EXCEPTION(603, "请求方法错误"),

    HTTP_MESSAGE_NOT_READABLE_EXCEPTION(604, "请求参数解析错误"),

    HTTP_MEDIA_TYPE_NOT_SUPPORTED_EXCEPTION(605, "ContentType设置错误"),

    MISSING_SERVLET_REQUEST_PART_EXCEPTION(606, "必需的文件未提交"),

    BAD_CREDENTIALS_EXCEPTION(607, "认证错误"),

    DISABLED_EXCEPTION(608, "用户已被禁用"),

    SYSTEM_IS_BUSY(609, "系统繁忙，请稍后重试"),

    UNAUTHORIZED(610, "认证失败，请重新登录"),

    FORBIDDEN(611, "权限不足，请与管理员联系"),

    CRON_EXPRESSION(612, "cron表达式错误"),

    QUARTZ_ALREADY_EXISTS(613, "定时任务已存在"),

    QUARTZ_EXECUTION_ERROR(614, "定时任务执行错误"),

    PASSWORD_FORMAT_ERROR(630, "密码格式错误"),

    ERROR(699, "其他");

    private final int code;

    private final String description;

}
